<!DOCTYPE html>
<html lang="en">
        <head>
                <meta charset="UTF-8">
                <title>Title</title>
        </head>
        <body>
                <div th:replace="common/top"></div>


                <div id="BackLink">
                        <a href="viewCart">Return to Shopping Cart</a>
                </div>

                <div id="Catalog">

                        <table>
                                <tr>
                                        <td>
                                                <h2>Checkout Summary</h2>

                                                <table>

                                                        <tr>
                                                                <td><b>Item ID</b></td>
                                                                <td><b>Product ID</b></td>
                                                                <td><b>Description</b></td>
                                                                <td><b>In Stock?</b></td>
                                                                <td><b>Quantity</b></td>
                                                                <td><b>List Price</b></td>
                                                                <td><b>Total Cost</b></td>
                                                        </tr>

                                                                <tr th:each="cartItem:${cart.getCartItemList()}">
                                                                        <td>
                                                                                <a th:text="${cartItem.item.itemId}"
                                                                                   th:href="@{/cart/viewItem(itemId=${cartItem.item.itemId})}">itemId</a>
                                                                        </td>
                                                                        <td th:text="${cartItem.item.product.productId}">
                                                                        </td>

                                                                        <td th:text="${cartItem.item.attribute1}+${cartItem.item.product.name}">

                                                                        <td th:text="${cartItem.inStock}">
                                                                                inStock
                                                                        </td>
                                                                        <td th:text="${cartItem.quantity}">quantity</td>
                                                                        <td th:text="${cartItem.item.listPrice}" pattern="$#,##0.00">
                                                                                2.33
                                                                        </td>
                                                                        <td th:text="${cartItem.total}" pattern="$#,##0.00">
                                                                                2.33
                                                                        </td>
                                                                </tr>
                                                        <tr>
                                                                <td colspan="7" th:text="'Sub Total: '+${cart.getSubTotal()}" pattern="$#,##0.00">
                                                                        Sub Total:
                                                                </td>
                                                        </tr>
                                                </table>

                                        <td>&nbsp;</td>

                                </tr>
                        </table>

                </div>


                <div th:replace="common/bottom"></div>

        </body>
</html>